package com.chenbingkang.bigdata.homework2;

import org.apache.hadoop.ipc.ProtocolSignature;

import java.io.IOException;

public class CalculateImpl implements Calculate{
    public int add(int number1, int number2) {
        return number1+number2;
    }
    public String get(String s){
        if(s.equals("20210123456789")){
            return "心心";
        }else{
            return null;
        }
    }

    public long getProtocolVersion(String s, long l) throws IOException {
        return Calculate.versionID;
    }

    public ProtocolSignature getProtocolSignature(String s, long l, int i) throws IOException {
        return new ProtocolSignature(Calculate.versionID,new int[]{123});
    }
}
